﻿
package system.data;

import java.util.*;

import framework.core.*;
/*
	Author    :Jackey
	CreateTime:2008-03-03 10:02:25
*/
public class CheckHeadBase extends Table 
{
public static final String TABLE_NAME = "T_CHECK_HEAD";

private static final String BACKUP_TABLE_NAME = "T_CHECK_HEAD_BACKUP";

private static final String BACKUP_SEQ_NAME = "S_CHECK_HEAD_BACKUP";


public static final String ID = "ID";

public static final String CHECK_BILL_CODE = "CHECK_BILL_CODE";

public static final String WAREHOUSE_CODE = "WAREHOUSE_CODE";

public static final String WAREHOUSE_NAME = "WAREHOUSE_NAME";

public static final String REMARK = "REMARK";

public static final String CHECK_TIME = "CHECK_TIME";

public static final String ADJUST_FLAG = "ADJUST_FLAG";

public static final String ADJUST_USER_ID = "ADJUST_USER_ID";

public static final String ADJUST_USER_NAME = "ADJUST_USER_NAME";

public static final String ADJUST_TIME = "ADJUST_TIME";

public static final String STATUS = "STATUS";

public static final String CREATE_USER_ID = "CREATE_USER_ID";

public static final String CREATE_USER = "CREATE_USER";

public static final String CREATE_TIME = "CREATE_TIME";

public static final String LAST_UPDATE_USER_ID = "LAST_UPDATE_USER_ID";

public static final String LAST_UPDATE_USER = "LAST_UPDATE_USER";

public static final String LAST_UPDATE_TIME = "LAST_UPDATE_TIME";

public static final String IS_SYNC = "IS_SYNC";


public static Vector m_fields = null;


private String m_id = ""; //ID

private String m_check_bill_code = ""; //盘点单编码

private String m_warehouse_code = ""; //盘点仓库编码

private String m_warehouse_name = ""; //盘点仓库名称

private String m_remark = ""; //备注

private String m_check_time = ""; //盘点时间

private String m_adjust_flag = ""; //调库标志

private String m_adjust_user_id = ""; //调库人ID

private String m_adjust_user_name = ""; //调库人

private String m_adjust_time = ""; //调库时间

private String m_status = ""; //是否有效

private String m_create_user_id = ""; //创建用户ID

private String m_create_user = ""; //创建用户

private String m_create_time = ""; //单证创建时间

private String m_last_update_user_id = ""; //最后修改人ID

private String m_last_update_user = ""; //最后修改人

private String m_last_update_time = ""; //最后修改时间

private String m_is_sync = ""; //是否同步



	public String getId()
	{
	    return m_id;
	}
	public void  setId(String v)
	{
		if(getId().equals(v)) return ;
		m_id = v ;
		markDirty(ID);
	}



	

	public String getCheckBillCode()
	{
	    return m_check_bill_code;
	}
	public void  setCheckBillCode(String v)
	{
		if(getCheckBillCode().equals(v)) return ;
		m_check_bill_code = v ;
		markDirty(CHECK_BILL_CODE);
	}



	

	public String getWarehouseCode()
	{
	    return m_warehouse_code;
	}
	public void  setWarehouseCode(String v)
	{
		if(getWarehouseCode().equals(v)) return ;
		m_warehouse_code = v ;
		markDirty(WAREHOUSE_CODE);
	}



	

	public String getWarehouseName()
	{
	    return m_warehouse_name;
	}
	public void  setWarehouseName(String v)
	{
		if(getWarehouseName().equals(v)) return ;
		m_warehouse_name = v ;
		markDirty(WAREHOUSE_NAME);
	}



	

	public String getRemark()
	{
	    return m_remark;
	}
	public void  setRemark(String v)
	{
		if(getRemark().equals(v)) return ;
		m_remark = v ;
		markDirty(REMARK);
	}



	

	public String getCheckTime()
	{
	    return m_check_time;
	}
	public void  setCheckTime(String v)
	{
		if(getCheckTime().equals(v)) return ;
		m_check_time = v ;
		markDirty(CHECK_TIME);
	}



	

	public String getAdjustFlag()
	{
	    return m_adjust_flag;
	}
	public void  setAdjustFlag(String v)
	{
		if(getAdjustFlag().equals(v)) return ;
		m_adjust_flag = v ;
		markDirty(ADJUST_FLAG);
	}



	

	public String getAdjustUserId()
	{
	    return m_adjust_user_id;
	}
	public void  setAdjustUserId(String v)
	{
		if(getAdjustUserId().equals(v)) return ;
		m_adjust_user_id = v ;
		markDirty(ADJUST_USER_ID);
	}



	

	public String getAdjustUserName()
	{
	    return m_adjust_user_name;
	}
	public void  setAdjustUserName(String v)
	{
		if(getAdjustUserName().equals(v)) return ;
		m_adjust_user_name = v ;
		markDirty(ADJUST_USER_NAME);
	}



	

	public String getAdjustTime()
	{
	    return m_adjust_time;
	}
	public void  setAdjustTime(String v)
	{
		if(getAdjustTime().equals(v)) return ;
		m_adjust_time = v ;
		markDirty(ADJUST_TIME);
	}



	

	public String getStatus()
	{
	    return m_status;
	}
	public void  setStatus(String v)
	{
		if(getStatus().equals(v)) return ;
		m_status = v ;
		markDirty(STATUS);
	}



	

	public String getCreateUserId()
	{
	    return m_create_user_id;
	}
	public void  setCreateUserId(String v)
	{
		if(getCreateUserId().equals(v)) return ;
		m_create_user_id = v ;
		markDirty(CREATE_USER_ID);
	}



	

	public String getCreateUser()
	{
	    return m_create_user;
	}
	public void  setCreateUser(String v)
	{
		if(getCreateUser().equals(v)) return ;
		m_create_user = v ;
		markDirty(CREATE_USER);
	}



	

	public String getCreateTime()
	{
	    return m_create_time;
	}
	public void  setCreateTime(String v)
	{
		if(getCreateTime().equals(v)) return ;
		m_create_time = v ;
		markDirty(CREATE_TIME);
	}



	

	public String getLastUpdateUserId()
	{
	    return m_last_update_user_id;
	}
	public void  setLastUpdateUserId(String v)
	{
		if(getLastUpdateUserId().equals(v)) return ;
		m_last_update_user_id = v ;
		markDirty(LAST_UPDATE_USER_ID);
	}



	

	public String getLastUpdateUser()
	{
	    return m_last_update_user;
	}
	public void  setLastUpdateUser(String v)
	{
		if(getLastUpdateUser().equals(v)) return ;
		m_last_update_user = v ;
		markDirty(LAST_UPDATE_USER);
	}



	

	public String getLastUpdateTime()
	{
	    return m_last_update_time;
	}
	public void  setLastUpdateTime(String v)
	{
		if(getLastUpdateTime().equals(v)) return ;
		m_last_update_time = v ;
		markDirty(LAST_UPDATE_TIME);
	}



	

	public String getIsSync()
	{
	    return m_is_sync;
	}
	public void  setIsSync(String v)
	{
		if(getIsSync().equals(v)) return ;
		m_is_sync = v ;
		markDirty(IS_SYNC);
	}



	



	public String viewId(DBConnection con) throws Exception
	{
		return Value.view(getId());
	}

	public String viewCheckBillCode(DBConnection con) throws Exception
	{
		return Value.view(getCheckBillCode());
	}

	public String viewWarehouseCode(DBConnection con) throws Exception
	{
		return Value.view(getWarehouseCode());
	}

	public String viewWarehouseName(DBConnection con) throws Exception
	{
		return Value.view(getWarehouseName());
	}

	public String viewRemark(DBConnection con) throws Exception
	{
		return Value.view(getRemark());
	}

	public String viewCheckTime(DBConnection con) throws Exception
	{
		return Value.view(getCheckTime());
	}

	public String viewAdjustFlag(DBConnection con) throws Exception
	{
		return Value.view(getAdjustFlag());
	}

	public String viewAdjustUserId(DBConnection con) throws Exception
	{
		return Value.view(getAdjustUserId());
	}

	public String viewAdjustUserName(DBConnection con) throws Exception
	{
		return Value.view(getAdjustUserName());
	}

	public String viewAdjustTime(DBConnection con) throws Exception
	{
		return Value.view(getAdjustTime());
	}

	public String viewStatus(DBConnection con) throws Exception
	{
		return Value.view(getStatus());
	}

	public String viewCreateUserId(DBConnection con) throws Exception
	{
		return Value.view(getCreateUserId());
	}

	public String viewCreateUser(DBConnection con) throws Exception
	{
		return Value.view(getCreateUser());
	}

	public String viewCreateTime(DBConnection con) throws Exception
	{
		return Value.view(getCreateTime());
	}

	public String viewLastUpdateUserId(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}

	public String viewLastUpdateUser(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUser());
	}

	public String viewLastUpdateTime(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateTime());
	}

	public String viewIsSync(DBConnection con) throws Exception
	{
		return Value.view(getIsSync());
	}



protected CheckHeadBase()
{
}

public void fill(CheckHeadPageData pageData) throws Exception
{

	if(pageData.getId()!=null)
	{	
		setId(pageData.getId());
	}

	if(pageData.getCheckBillCode()!=null)
	{	
		setCheckBillCode(pageData.getCheckBillCode());
	}

	if(pageData.getWarehouseCode()!=null)
	{	
		setWarehouseCode(pageData.getWarehouseCode());
	}

	if(pageData.getWarehouseName()!=null)
	{	
		setWarehouseName(pageData.getWarehouseName());
	}

	if(pageData.getRemark()!=null)
	{	
		setRemark(pageData.getRemark());
	}

	if(pageData.getCheckTime()!=null)
	{	
		setCheckTime(pageData.getCheckTime());
	}

	if(pageData.getAdjustFlag()!=null)
	{	
		setAdjustFlag(pageData.getAdjustFlag());
	}

	if(pageData.getAdjustUserId()!=null)
	{	
		setAdjustUserId(pageData.getAdjustUserId());
	}

	if(pageData.getAdjustUserName()!=null)
	{	
		setAdjustUserName(pageData.getAdjustUserName());
	}

	if(pageData.getAdjustTime()!=null)
	{	
		setAdjustTime(pageData.getAdjustTime());
	}

	if(pageData.getStatus()!=null)
	{	
		setStatus(pageData.getStatus());
	}

	if(pageData.getCreateUserId()!=null)
	{	
		setCreateUserId(pageData.getCreateUserId());
	}

	if(pageData.getCreateUser()!=null)
	{	
		setCreateUser(pageData.getCreateUser());
	}

	if(pageData.getCreateTime()!=null)
	{	
		setCreateTime(pageData.getCreateTime());
	}

	if(pageData.getLastUpdateUserId()!=null)
	{	
		setLastUpdateUserId(pageData.getLastUpdateUserId());
	}

	if(pageData.getLastUpdateUser()!=null)
	{	
		setLastUpdateUser(pageData.getLastUpdateUser());
	}

	if(pageData.getLastUpdateTime()!=null)
	{	
		setLastUpdateTime(pageData.getLastUpdateTime());
	}

	if(pageData.getIsSync()!=null)
	{	
		setIsSync(pageData.getIsSync());
	}

}

public String getTableName() 
{
	return TABLE_NAME;
}

public String getBackupTableName() 
{
	return BACKUP_TABLE_NAME;
}

public String getBackupSeqName() 
{
	return BACKUP_SEQ_NAME;
}

public java.util.Vector getFields() 
{
	if(m_fields==null)
	{
		m_fields = new Vector();

		m_fields.add(new Field(ID,Value.TYPE_STRING,false,true,32,"ID"));

		m_fields.add(new Field(CHECK_BILL_CODE,Value.TYPE_STRING,true,true,30,"盘点单编码"));

		m_fields.add(new Field(WAREHOUSE_CODE,Value.TYPE_STRING,false,true,30,"盘点仓库编码"));

		m_fields.add(new Field(WAREHOUSE_NAME,Value.TYPE_STRING,false,false,50,"盘点仓库名称"));

		m_fields.add(new Field(REMARK,Value.TYPE_STRING,false,false,200,"备注"));

		m_fields.add(new Field(CHECK_TIME,Value.TYPE_STRING,false,true,20,"盘点时间"));

		m_fields.add(new Field(ADJUST_FLAG,Value.TYPE_STRING,false,true,1,"调库标志"));

		m_fields.add(new Field(ADJUST_USER_ID,Value.TYPE_STRING,false,true,32,"调库人ID"));

		m_fields.add(new Field(ADJUST_USER_NAME,Value.TYPE_STRING,false,false,50,"调库人"));

		m_fields.add(new Field(ADJUST_TIME,Value.TYPE_STRING,false,false,20,"调库时间"));

		m_fields.add(new Field(STATUS,Value.TYPE_STRING,false,true,1,"是否有效"));

		m_fields.add(new Field(CREATE_USER_ID,Value.TYPE_STRING,false,true,32,"创建用户ID"));

		m_fields.add(new Field(CREATE_USER,Value.TYPE_STRING,false,false,50,"创建用户"));

		m_fields.add(new Field(CREATE_TIME,Value.TYPE_STRING,false,false,20,"单证创建时间"));

		m_fields.add(new Field(LAST_UPDATE_USER_ID,Value.TYPE_STRING,false,true,32,"最后修改人ID"));

		m_fields.add(new Field(LAST_UPDATE_USER,Value.TYPE_STRING,false,false,50,"最后修改人"));

		m_fields.add(new Field(LAST_UPDATE_TIME,Value.TYPE_STRING,false,false,20,"最后修改时间"));

		m_fields.add(new Field(IS_SYNC,Value.TYPE_STRING,false,true,1,"是否同步"));
		
	}
	return m_fields;
}

public void initObject(java.sql.ResultSet rs) throws Exception
{

	m_id = getString(rs,ID);

	m_check_bill_code = getString(rs,CHECK_BILL_CODE);

	m_warehouse_code = getString(rs,WAREHOUSE_CODE);

	m_warehouse_name = getString(rs,WAREHOUSE_NAME);

	m_remark = getString(rs,REMARK);

	m_check_time = getString(rs,CHECK_TIME);

	m_adjust_flag = getString(rs,ADJUST_FLAG);

	m_adjust_user_id = getString(rs,ADJUST_USER_ID);

	m_adjust_user_name = getString(rs,ADJUST_USER_NAME);

	m_adjust_time = getString(rs,ADJUST_TIME);

	m_status = getString(rs,STATUS);

	m_create_user_id = getString(rs,CREATE_USER_ID);

	m_create_user = getString(rs,CREATE_USER);

	m_create_time = getString(rs,CREATE_TIME);

	m_last_update_user_id = getString(rs,LAST_UPDATE_USER_ID);

	m_last_update_user = getString(rs,LAST_UPDATE_USER);

	m_last_update_time = getString(rs,LAST_UPDATE_TIME);

	m_is_sync = getString(rs,IS_SYNC);

	ms_new_flag = ConstDefine.NO;
}

public Value get(String f)
{

	if(f.equalsIgnoreCase(ID))
	{
		return new Value(getId());
	}

	if(f.equalsIgnoreCase(CHECK_BILL_CODE))
	{
		return new Value(getCheckBillCode());
	}

	if(f.equalsIgnoreCase(WAREHOUSE_CODE))
	{
		return new Value(getWarehouseCode());
	}

	if(f.equalsIgnoreCase(WAREHOUSE_NAME))
	{
		return new Value(getWarehouseName());
	}

	if(f.equalsIgnoreCase(REMARK))
	{
		return new Value(getRemark());
	}

	if(f.equalsIgnoreCase(CHECK_TIME))
	{
		return new Value(getCheckTime());
	}

	if(f.equalsIgnoreCase(ADJUST_FLAG))
	{
		return new Value(getAdjustFlag());
	}

	if(f.equalsIgnoreCase(ADJUST_USER_ID))
	{
		return new Value(getAdjustUserId());
	}

	if(f.equalsIgnoreCase(ADJUST_USER_NAME))
	{
		return new Value(getAdjustUserName());
	}

	if(f.equalsIgnoreCase(ADJUST_TIME))
	{
		return new Value(getAdjustTime());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		return new Value(getStatus());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		return new Value(getCreateUserId());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		return new Value(getCreateUser());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		return new Value(getCreateTime());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		return new Value(getLastUpdateUserId());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		return new Value(getLastUpdateUser());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		return new Value(getLastUpdateTime());
	}

	if(f.equalsIgnoreCase(IS_SYNC))
	{
		return new Value(getIsSync());
	}
	
	return null;
}
public void set(String f,Value v) throws Exception
{

	if(f.equalsIgnoreCase(ID))
	{
		setId(v.getString());
	}

	if(f.equalsIgnoreCase(CHECK_BILL_CODE))
	{
		setCheckBillCode(v.getString());
	}

	if(f.equalsIgnoreCase(WAREHOUSE_CODE))
	{
		setWarehouseCode(v.getString());
	}

	if(f.equalsIgnoreCase(WAREHOUSE_NAME))
	{
		setWarehouseName(v.getString());
	}

	if(f.equalsIgnoreCase(REMARK))
	{
		setRemark(v.getString());
	}

	if(f.equalsIgnoreCase(CHECK_TIME))
	{
		setCheckTime(v.getString());
	}

	if(f.equalsIgnoreCase(ADJUST_FLAG))
	{
		setAdjustFlag(v.getString());
	}

	if(f.equalsIgnoreCase(ADJUST_USER_ID))
	{
		setAdjustUserId(v.getString());
	}

	if(f.equalsIgnoreCase(ADJUST_USER_NAME))
	{
		setAdjustUserName(v.getString());
	}

	if(f.equalsIgnoreCase(ADJUST_TIME))
	{
		setAdjustTime(v.getString());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		setStatus(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		setCreateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		setCreateUser(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		setCreateTime(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		setLastUpdateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		setLastUpdateUser(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		setLastUpdateTime(v.getString());
	}

	if(f.equalsIgnoreCase(IS_SYNC))
	{
		setIsSync(v.getString());
	}
	
}
public String toString()
{
	String msg = "CheckHead=\n";
	msg += "(\r\n";

	msg += "    ID(id)="+get("id")+"\r\n";

	msg += "    盘点单编码(check_bill_code)="+get("check_bill_code")+"\r\n";

	msg += "    盘点仓库编码(warehouse_code)="+get("warehouse_code")+"\r\n";

	msg += "    盘点仓库名称(warehouse_name)="+get("warehouse_name")+"\r\n";

	msg += "    备注(remark)="+get("remark")+"\r\n";

	msg += "    盘点时间(check_time)="+get("check_time")+"\r\n";

	msg += "    调库标志(adjust_flag)="+get("adjust_flag")+"\r\n";

	msg += "    调库人ID(adjust_user_id)="+get("adjust_user_id")+"\r\n";

	msg += "    调库人(adjust_user_name)="+get("adjust_user_name")+"\r\n";

	msg += "    调库时间(adjust_time)="+get("adjust_time")+"\r\n";

	msg += "    是否有效(status)="+get("status")+"\r\n";

	msg += "    创建用户ID(create_user_id)="+get("create_user_id")+"\r\n";

	msg += "    创建用户(create_user)="+get("create_user")+"\r\n";

	msg += "    单证创建时间(create_time)="+get("create_time")+"\r\n";

	msg += "    最后修改人ID(last_update_user_id)="+get("last_update_user_id")+"\r\n";

	msg += "    最后修改人(last_update_user)="+get("last_update_user")+"\r\n";

	msg += "    最后修改时间(last_update_time)="+get("last_update_time")+"\r\n";

	msg += "    是否同步(is_sync)="+get("is_sync")+"\r\n";
		
	msg += ")\r\n";
	return msg;
}
public void copyBase(CheckHeadBase srcObj)
{

	setId(srcObj.getId());

	setWarehouseCode(srcObj.getWarehouseCode());

	setWarehouseName(srcObj.getWarehouseName());

	setRemark(srcObj.getRemark());

	setCheckTime(srcObj.getCheckTime());

	setAdjustFlag(srcObj.getAdjustFlag());

	setAdjustUserId(srcObj.getAdjustUserId());

	setAdjustUserName(srcObj.getAdjustUserName());

	setAdjustTime(srcObj.getAdjustTime());

	setStatus(srcObj.getStatus());

	setCreateUserId(srcObj.getCreateUserId());

	setCreateUser(srcObj.getCreateUser());

	setCreateTime(srcObj.getCreateTime());

	setLastUpdateUserId(srcObj.getLastUpdateUserId());

	setLastUpdateUser(srcObj.getLastUpdateUser());

	setLastUpdateTime(srcObj.getLastUpdateTime());

	setIsSync(srcObj.getIsSync());

}

public String toXml() throws Exception
{
	String xml = "";
	xml += "<CheckHead>";

	xml += "<Id>"+Value.view(getId())+"</Id>";

	xml += "<CheckBillCode>"+Value.view(getCheckBillCode())+"</CheckBillCode>";

	xml += "<WarehouseCode>"+Value.view(getWarehouseCode())+"</WarehouseCode>";

	xml += "<WarehouseName>"+Value.view(getWarehouseName())+"</WarehouseName>";

	xml += "<Remark>"+Value.view(getRemark())+"</Remark>";

	xml += "<CheckTime>"+Value.view(getCheckTime())+"</CheckTime>";

	xml += "<AdjustFlag>"+Value.view(getAdjustFlag())+"</AdjustFlag>";

	xml += "<AdjustUserId>"+Value.view(getAdjustUserId())+"</AdjustUserId>";

	xml += "<AdjustUserName>"+Value.view(getAdjustUserName())+"</AdjustUserName>";

	xml += "<AdjustTime>"+Value.view(getAdjustTime())+"</AdjustTime>";

	xml += "<Status>"+Value.view(getStatus())+"</Status>";

	xml += "<CreateUserId>"+Value.view(getCreateUserId())+"</CreateUserId>";

	xml += "<CreateUser>"+Value.view(getCreateUser())+"</CreateUser>";

	xml += "<CreateTime>"+Value.view(getCreateTime())+"</CreateTime>";

	xml += "<LastUpdateUserId>"+Value.view(getLastUpdateUserId())+"</LastUpdateUserId>";

	xml += "<LastUpdateUser>"+Value.view(getLastUpdateUser())+"</LastUpdateUser>";

	xml += "<LastUpdateTime>"+Value.view(getLastUpdateTime())+"</LastUpdateTime>";

	xml += "<IsSync>"+Value.view(getIsSync())+"</IsSync>";
	
	xml += "</CheckHead>";
	return xml;
}

}
